package com.example.wiki.controller;

import cn.dev33.satoken.util.SaResult;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.example.wiki.domain.Ebook;
import com.example.wiki.req.EbookReq;
import com.example.wiki.resp.Result;
import com.example.wiki.service.EbookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class EbookController {

@Autowired
public EbookService ebookService;


    @RequestMapping("/test")
    public Result ebook(EbookReq ebookReq) {
        List<Ebook> list = ebookService.list();
        return Result.ok(list);

    }

}
